#include "SMPPDisplayTime.hpp"

using namespace smpp::pdu;

DisplayTime::DisplayTime(const quint8 nValue):
TLV(TLVtags::TAG_DISPLAY_TIME,1),_Value(nValue){}

DisplayTime::DisplayTime(const DisplayTime &nDisplayTime):
TLV(nDisplayTime),_Value(nDisplayTime.getValue()){}

bool DisplayTime::operator ==(const DisplayTime &nDisplayTime) const{
	return (TLV::operator == (nDisplayTime) && 
			_Value == nDisplayTime.getValue());
}

bool DisplayTime::operator !=(const DisplayTime &nDisplayTime) const{
	return !this->operator == (nDisplayTime);
}

DisplayTime &DisplayTime::operator = (const DisplayTime &nDisplayTime){
	if(*this == nDisplayTime)
		return *this;
	TLV::operator = (nDisplayTime);
	_Value = nDisplayTime.getValue();
	return *this;
}

void DisplayTime::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 DisplayTime::getValue() const{
	return _Value;
}
